﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<PagedList<CourseSystem.Core.Entities.ExaminationItemInfo>>" %>
<%@ Import Namespace="CourseSystem.Common.Helpers" %>
<%@ Import Namespace="CourseSystem.Core.BLL" %>
<%@ Import Namespace="Webdiyer.WebControls.Mvc" %>
<table width="100%" border="0" cellpadding="4" cellspacing="1" class="table03">
    <tr class="box06">
        <td width="5%" align="center">
            序号
        </td>
        <td width="40%" align="center">
            题干内容
        </td>
        <td width="10%" align="center">
            试题类型
        </td>
        <td width="5%" align="center">
            分值
        </td>
        <td width="10%" align="center">
            难度系数
        </td>
        <td width="10%" align="center">
            创建日期
        </td>
        <td width="10%" align="center">
            操作
        </td>
    </tr>
    <% int i = 1;

       foreach (var item in Model)
       {
           if (i % 2 != 0)
           {%>
    <tr class="box01">
        <%}
           else
           { %>
        <tr class="box02" onmouseover="this.className='bg3'" onmouseout="this.className='bg4'"
            bgcolor="#FFFFFF">
            <%} %>
            <td height="27" align="center">
                <%=i++ %>
            </td>
            <td>
                <%=TextHelper.DisplayText(item.QuestionLibInfo.Title,35) %>
            </td>
            <td align="center">
                <%=QuestionLibHelper.GetDtType(item.QuestionLibInfo.Type)%>
            </td>
            <td align="center">
                <%=item.QuestionLibInfo.Score%>
            </td>
            <td align="center">
                <%=item.QuestionLibInfo.DiffCoe%>
            </td>
            <td align="center">
                <%=item.QuestionLibInfo.AddTime.ToString("yyyy-MM-dd HH:mm")%>
            </td>
            <td align="center">
              <%--  <%=Html.ActionLink("编辑答案", "AnswerEdit", new { id = item.Qid,fromId=item.Eid })%>--%>
                <%=Html.ActionLink("删除", "ExaminationItemDel", new { Eid = item.Eid,item.Id })%>
            </td>
        </tr>
        <%} %>
</table>
<table width="98%" height="7" border="0" align="center" cellpadding="0" cellspacing="0"
    bordercolor="#FFFFFF">
    <tr>
        <td class="gray12">
            &nbsp;
        </td>
        <td align="right" class="gray12">
            <%=Html.AjaxPager(Model, new PagerOptions() { ContainerTagName = "span", CssClass = "mvcPager", PageIndexParameterName = "pid", ShowMorePagerItems = false, AlwaysShowFirstLastPageNumber = true, }, new AjaxOptions() { UpdateTargetId = "listDiv" })%>
            共<%=Model.TotalItemCount %>条记录，页<%=Model.CurrentPageIndex %>/<%=Model.TotalPageCount %>
        </td>
    </tr>
</table>
